/***** 
The Passive-Aggressive Voter: The Calculus of Casting an Invalid Vote in European Democracies
Political Research Quarterly (DOI: 10.1177/1065912916662356)
Data Operations

Mert Moral
09.08.2016
*****/

/*
Notes:
- v1 refers to the original dataset downloaded from the CSES website.
- Please change the working directory and data file name.
*/

cd "/Users/mmoral/Dropbox/SUNY Binghamton PhD/Miscellaneous/The Passive-Aggressive Voter_The Calculus of Casting an Invalid Vote in European Democracies/Replication"

** Module2
use "cses2 by MM v1.dta", clear

* Abstention
recode B3004_1 (2=0) (4/9=.a), gen(vote)

* Invalid and blank votes
gen invalid=.
gen none=.
foreach var of varlist B3006_* {
replace invalid=1 if `var'==96 
replace none=1 if `var'==90
}

* Niche party vote
gen nvote=.
replace nvote=1 if B1004=="BEL_2003" & B3006_1==4 | B1004=="BEL_2003" & B3006_1==5 | B1004=="BEL_2003" & B3006_1==12
replace nvote=1 if B1004=="DNK_2001" & B3006_1==6 | B1004=="DNK_2001" & B3006_1==5 | B1004=="DNK_2001" & B3006_1==10
replace nvote=1 if B1004=="ESP_2004" & B3006_1==3 | B1004=="ESP_2004" & B3006_1==15 | B1004=="ESP_2004" & B3006_1==5 | B1004=="ESP_2004" & B3006_1==14 | B1004=="ESP_2004" & B3006_1==17
replace nvote=1 if B1004=="ISL_2003" & B3006_1==4
replace nvote=1 if B1004=="ITA_2006" & B3006_1==2 | B1004=="ITA_2006" & B3006_1==3 | B1004=="ITA_2006" & B3006_1==6
replace nvote=1 if B1004=="NLD_2002" & B3006_1==9 | B1004=="NLD_2002" & B3006_1==5 | B1004=="NLD_2002" & B3006_1==10 | B1004=="NLD_2002" & B3006_1==6
replace nvote=1 if B1004=="SVN_2004" & B3006_1==6
replace nvote=1 if B1004=="SWE_2002" & B3006_1==1

* Mainstream party vote
gen mvote=.
replace mvote=1 if B1004=="BEL_2003" & B3006_1==1 | B1004=="BEL_2003" & B3006_1==2 | B1004=="BEL_2003" & B3006_1==3 | B1004=="BEL_2003" & B3006_1==9 | B1004=="BEL_2003" & B3006_1==10 | B1004=="BEL_2003" & B3006_1==11
replace mvote=1 if B1004=="DNK_2001" & B3006_1==8 | B1004=="DNK_2001" & B3006_1==1 | B1004=="DNK_2001" & B3006_1==3 | B1004=="DNK_2001" & B3006_1==2 | B1004=="DNK_2001" & B3006_1==7 | B1004=="DNK_2001" & B3006_1==4
replace mvote=1 if B1004=="ESP_2004" & B3006_1==2 | B1004=="ESP_2004" & B3006_1==1 | B1004=="ESP_2004" & B3006_1==4
replace mvote=1 if B1004=="ISL_2003" & B3006_1==3 | B1004=="ISL_2003" & B3006_1==1 | B1004=="ISL_2003" & B3006_1==5
replace mvote=1 if B1004=="ITA_2006" & B3006_1==1 | B1004=="ITA_2006" & B3006_1==5
replace mvote=1 if B1004=="NLD_2002" & B3006_1==2 | B1004=="NLD_2002" & B3006_1==3 | B1004=="NLD_2002" & B3006_1==1 | B1004=="NLD_2002" & B3006_1==4 | B1004=="NLD_2002" & B3006_1==7
replace mvote=1 if B1004=="POL_2001" & B3006_1==1 | B1004=="POL_2001" & B3006_1==7 | B1004=="POL_2001" & B3006_1==5 | B1004=="POL_2001" & B3006_1==10 | B1004=="POL_2001" & B3006_1==2 | B1004=="POL_2001" & B3006_1==3
replace mvote=1 if B1004=="SVN_2004" & B3006_1==1 | B1004=="SVN_2004" & B3006_1==2 | B1004=="SVN_2004" & B3006_1==3 | B1004=="SVN_2004" & B3006_1==4 | B1004=="SVN_2004" & B3006_1==5
replace mvote=1 if B1004=="SWE_2002" & B3006_1==2 | B1004=="SWE_2002" & B3006_1==5 | B1004=="SWE_2002" & B3006_1==4 | B1004=="SWE_2002" & B3006_1==6

* Political information
recode B3047_1 B3047_2 B3047_3 (2/8=-1) (9=.a)
egen polinf= rowtotal(B3047_1 B3047_2 B3047_3), missing

* Political knowledge
capture noisily foreach var in A B C D E F {
recode B3038_`var' (11/99=.a)
by B1004, sort : egen float sd`var' = sd(B3038_`var')
by B1004, sort : egen float mean`var' = mean(B3038_`var')
gen pk`var'=abs(B3038_`var'-mean`var')
replace pk`var'=mean`var'+sd`var' if missing(pk`var') & mean`var'!=.
}

egen pk=rowtotal(pk*)
egen pkt=rownonmiss(pkA pkB pkC pkD pkE pkF)
replace pk=pk/pkt

* Compulsory voting
recode B5037 (5=0) (1=3) (2=2), gen(comp)

* Age
recode B2001 (998/999=.a), gen(age)

* Gender
recode B2002 (9=.a) (1=0) (2=1), gen(sex)

* Education
recode B2003 (1/2=0) (3/4=1) (5=2) (6/7=3) (8=4) (9=5) (97/99=.a), gen(educ)

* Income
recode B2020 (7/9=.a), gen(inc)

* Union membership
recode B2005 (2=0) (7/9=.a), gen(union)

* Urban dwellers
recode B2030 (8/9=.a), gen(urban)

* Retrospective evaluation of government performance
recode B3011 (1=2) (2=1) (3=-1) (4=-2) (5=0) (7/9=.a), gen(govper)

* Satisfaction with democracy
recode B3012 (1=2) (2=1) (3=-1) (4=-2) (6=0) (7/9=.a), gen(satis)

* Extreme ideology
recode B3045 (96/99=.a), gen(idst)
by B1003, sort : egen float meanidst = mean(idst)
by B1003, sort : egen float sdidst = sd(idst)
replace idst=abs(idst-meanidst)/sdidst

* Data
rename (B1004 B1015 B3045 B2031 B3038* B5001* B5012* B5002* B5004*) (C1004 C1015 C3013 C2031 C3011* C5001* C5016* C5002* C5004*)
gen module=2
keep vote invalid none nvote mvote polinf pk comp age sex educ inc union urban govper satis idst module C3011_A C3011_B C3011_C C3011_D C3011_E C3011_F C3011_G C3011_H C3011_I C3013 C5001_A C5001_B C5001_C C5001_D C5001_E C5001_F C5001_G C5001_H C5001_I C5002_A C5002_B C5002_C C5002_D C5002_E C5002_F C5002_G C5002_H C5002_I C5004_A C5004_B C5004_C C5004_D C5004_E C5004_F C5004_G C5004_H C5004_I C5016_A C5016_B C5016_C C5016_D C5016_E C5016_F C5016_G C5016_H C5016_I C1004 C1015 C2031
saveold "cses2 by MM v2.dta", replace

** Module 3
use "cses3 by MM v1.dta", clear

* Abstention
recode C3021_1 (5=0) (7/9=.a), gen(vote)

* Invalid and blank votes
gen invalid=.
gen none=.
foreach var of varlist C3023_LH_PL {
replace invalid=1 if `var'==92 | `var'==93
replace none=1 if `var'==91
}

* Niche party vote
gen nvote=.
replace nvote=1 if C1004=="AUT_2008" & C3023_LH_PL==3 | C1004=="AUT_2008" & C3023_LH_PL==5 | C1004=="AUT_2008" & C3023_LH_PL==4
replace nvote=1 if C1004=="CZE_2006" & C3023_LH_PL==19 | C1004=="CZE_2006" & C3023_LH_PL==17
replace nvote=1 if C1004=="CZE_2010" & C3023_LH_PL==6 | C1004=="CZE_2010" & C3023_LH_PL==4 | C1004=="CZE_2010" & C3023_LH_PL==20
replace nvote=1 if C1004=="DEU_2005" & C3023_LH_PL==6 | C1004=="DEU_2005" & C3023_LH_PL==5
replace nvote=1 if C1004=="DNK_2007" & C3023_LH_PL==6 | C1004=="DNK_2007" & C3023_LH_PL==4 | C1004=="DNK_2007" & C3023_LH_PL==9
replace nvote=1 if C1004=="ESP_2008" & C3023_LH_PL==6 | C1004=="ESP_2008" & C3023_LH_PL==8 | C1004=="ESP_2008" & C3023_LH_PL==3
replace nvote=1 if C1004=="EST_2011" & C3023_LH_PL==1
replace nvote=1 if C1004=="FIN_2007" & C3023_LH_PL==4 | C1004=="FIN_2007" & C3023_LH_PL==5 | C1004=="FIN_2007" & C3023_LH_PL==6
replace nvote=1 if C1004=="GRC_2009" & C3023_LH_PL==3 | C1004=="GRC_2009" & C3023_LH_PL==5 | C1004=="GRC_2009" & C3023_LH_PL==6
replace nvote=1 if C1004=="HRV_2007" & C3023_LH_PL==1 | C1004=="HRV_2007" & C3023_LH_PL==10 | C1004=="HRV_2007" & C3023_LH_PL==7 | C1004=="HRV_2007" & C3023_LH_PL==8
replace nvote=1 if C1004=="ISL_2007" & C3023_LH_PL==4 | C1004=="ISL_2007" & C3023_LH_PL==6 | C1004=="ISL_2009" & C3023_LH_PL==4
replace nvote=1 if C1004=="LVA_2010" & C3023_LH_PL==3 | C1004=="LVA_2010" & C3023_LH_PL==6 | C1004=="LVA_2010" & C3023_LH_PL==7
replace nvote=1 if C1004=="NLD_2010" & C3023_LH_PL==3 | C1004=="NLD_2010" & C3023_LH_PL==5 | C1004=="NLD_2010" & C3023_LH_PL==7 | C1004=="NLD_2010" & C3023_LH_PL==9
replace nvote=1 if C1004=="NOR_2005" & C3023_LH_PL==2 | C1004=="NOR_2005" & C3023_LH_PL==1 /* C1004=="NOR_2005" & C3023_LH_PL==8 */
replace nvote=1 if C1004=="PRT_2009" & C3023_LH_PL==1 | C1004=="PRT_2009" & C3023_LH_PL==3
replace nvote=1 if C1004=="SWE_2006" & C3023_LH_PL==1 | C1004=="SWE_2006" & C3023_LH_PL==7 | C1004=="SWE_2006" & C3023_LH_PL==8
replace nvote=1 if C1004=="TUR_2011" & C3023_LH_PL==3 | C1004=="TUR_2011" & C3023_LH_PL==4 | C1004=="TUR_2011" & C3023_LH_PL==5

* Mainstream party vote
gen mvote=.
replace mvote=1 if C1004=="AUT_2008" & C3023_LH_PL==1 | C1004=="AUT_2008" & C3023_LH_PL==2 | C1004=="AUT_2008" & C3023_LH_PL==6
replace mvote=1 if C1004=="CZE_2006" & C3023_LH_PL==8 | C1004=="CZE_2006" & C3023_LH_PL==9 | C1004=="CZE_2006" & C3023_LH_PL==23
replace mvote=1 if C1004=="CZE_2010" & C3023_LH_PL==9 | C1004=="CZE_2010" & C3023_LH_PL==26 | C1004=="CZE_2010" & C3023_LH_PL==15 | C1004=="CZE_2010" & C3023_LH_PL==17
replace mvote=1 if C1004=="DEU_2005" & C3023_LH_PL==3 | C1004=="DEU_2005" & C3023_LH_PL==1 | C1004=="DEU_2005" & C3023_LH_PL==4 | C1004=="DEU_2005" & C3023_LH_PL==2
replace mvote=1 if C1004=="DNK_2007" & C3023_LH_PL==7 | C1004=="DNK_2007" & C3023_LH_PL==1 | C1004=="DNK_2007" & C3023_LH_PL==3 | C1004=="DNK_2007" & C3023_LH_PL==2 | C1004=="DNK_2007" & C3023_LH_PL==8 | C1004=="DNK_2007" & C3023_LH_PL==5
replace mvote=1 if C1004=="ESP_2008" & C3023_LH_PL==2 | C1004=="ESP_2008" & C3023_LH_PL==1 | C1004=="ESP_2008" & C3023_LH_PL==5 | C1004=="ESP_2008" & C3023_LH_PL==4
replace mvote=1 if C1004=="EST_2011" & C3023_LH_PL==4 | C1004=="EST_2011" & C3023_LH_PL==5 | C1004=="EST_2011" & C3023_LH_PL==2 | C1004=="EST_2011" & C3023_LH_PL==3
replace mvote=1 if C1004=="FIN_2007" & C3023_LH_PL==3 | C1004=="FIN_2007" & C3023_LH_PL==2 | C1004=="FIN_2007" & C3023_LH_PL==7
replace mvote=1 if C1004=="GRC_2009" & C3023_LH_PL==1 | C1004=="GRC_2009" & C3023_LH_PL==2
replace mvote=1 if C1004=="HRV_2007" & C3023_LH_PL==2 | C1004=="HRV_2007" & C3023_LH_PL==3 | C1004=="HRV_2007" & C3023_LH_PL==4
replace mvote=1 if C1004=="ISL_2007" & C3023_LH_PL==3 | C1004=="ISL_2007" & C3023_LH_PL==1 | C1004=="ISL_2007" & C3023_LH_PL==5
replace mvote=1 if C1004=="ISL_2009" & C3023_LH_PL==1 | C1004=="ISL_2009" & C3023_LH_PL==3 | C1004=="ISL_2009" & C3023_LH_PL==5
replace mvote=1 if C1004=="LVA_2010" & C3023_LH_PL==2 | C1004=="LVA_2010" & C3023_LH_PL==1 | C1004=="LVA_2010" & C3023_LH_PL==4
replace mvote=1 if C1004=="NLD_2010" & C3023_LH_PL==1 | C1004=="NLD_2010" & C3023_LH_PL==2 | C1004=="NLD_2010" & C3023_LH_PL==4 | C1004=="NLD_2010" & C3023_LH_PL==6 | C1004=="NLD_2010" & C3023_LH_PL==8
replace mvote=1 if C1004=="NOR_2005" & C3023_LH_PL==3 | C1004=="NOR_2005" & C3023_LH_PL==7 | C1004=="NOR_2005" & C3023_LH_PL==5 | C1004=="NOR_2005" & C3023_LH_PL==4
replace mvote=1 if C1004=="PRT_2009" & C3023_LH_PL==5 | C1004=="PRT_2009" & C3023_LH_PL==4 | C1004=="PRT_2009" & C3023_LH_PL==2
replace mvote=1 if C1004=="SWE_2006" & C3023_LH_PL==2 | C1004=="SWE_2006" & C3023_LH_PL==5 | C1004=="SWE_2006" & C3023_LH_PL==4 | C1004=="SWE_2006" & C3023_LH_PL==6
replace mvote=1 if C1004=="TUR_2011" & C3023_LH_PL==1 | C1004=="TUR_2011" & C3023_LH_PL==2 | C1004=="TUR_2011" & C3023_LH_PL==8 | C1004=="TUR_2011" & C3023_LH_PL==9

* Political information
recode C3036_1 C3036_2 C3036_3 (5/8=-1) (9=.a)
egen polinf= rowtotal(C3036_1 C3036_2 C3036_3), missing

* Political knowledge
foreach var in A B C D E F {
recode C3011_`var' (11/99=.a)
sum C3011_`var'
by C1004, sort : egen float sd`var' = sd(C3011_`var')
by C1004, sort : egen float mean`var' = mean(C3011_`var')
gen pk`var'=abs(C3011_`var'-mean`var')
replace pk`var'=mean`var'+sd`var' if missing(pk`var') & mean`var'!=.
}
egen pk=rowtotal(pk*)
egen pkt=rownonmiss(pkA pkB pkC pkD pkE pkF)
replace pk=pk/pkt

* Compulsory voting
recode C5044_1 (5=0) (1=3) (2=2) (3=1), gen(comp)

* Age
recode C2001 (997/999=.a), gen(age)

* Gender
recode C2002 (9=.a) (1=0) (2=1), gen(sex)

* Education
recode C2003 (1/2=0) (3/4=1) (5=2) (6/7=3) (8=4) (9=5) (97/99=.a), gen(educ)

* Income
recode C2020 (7/9=.a), gen(inc)

* Union membership
recode C2005 (2=0) (7/9=.a), gen(union)

* Urban dwellers
recode C2030 (7/9=.a), gen(urban)

* Retrospective evaluation of government performance
recode C3006 (1=2) (2=1) (3=-1) (4=-2) (6=0) (7/9=.a), gen(govper)

* Satisfaction with democracy
recode C3019 (1=2) (2=1) (4=-1) (5=-2) (6=0) (7/9=.a), gen(satis)

* Extreme ideology
recode C3013 (95/99=.a), gen(idst)
by C1003, sort : egen float meanidst = mean(idst)
by C1003, sort : egen float sdidst = sd(idst)
replace idst=abs(idst-meanidst)/sdidst

* Data
gen module=3
keep vote invalid none nvote mvote polinf pk comp age sex educ inc union urban govper satis idst module C3011_A C3011_B C3011_C C3011_D C3011_E C3011_F C3011_G C3011_H C3011_I C3013 C5001_A C5001_B C5001_C C5001_D C5001_E C5001_F C5001_G C5001_H C5001_I C5002_A C5002_B C5002_C C5002_D C5002_E C5002_F C5002_G C5002_H C5002_I C5004_A C5004_B C5004_C C5004_D C5004_E C5004_F C5004_G C5004_H C5004_I C5016_A C5016_B C5016_C C5016_D C5016_E C5016_F C5016_G C5016_H C5016_I C1004 C1015
saveold "cses3 by MM v2.dta", replace

** Merging datasets
append using "cses2 by MM v2.dta"

* Presidential elections
drop if C1015!=10

* European countries
split C1004, p("_")
egen float country = group(C10041), label lname(coun)
egen pan = concat(C10041 C10042)
keep if pan=="ALB2005" | pan=="AUT2008" | pan=="BEL2003" | pan=="BGR2001" | pan=="BLR2008" | pan=="CHE2003" | pan=="CHE2007" | pan=="CZE2002" | pan=="CZE2006" | pan=="CZE2010" | pan=="DEU2005" | pan=="DEU2009" | pan=="DNK2001" | pan=="DNK2007" | pan=="ESP2004" | pan=="ESP2008" | pan=="EST2011" | pan=="FIN2003" | pan=="FIN2007" | pan=="FIN2011" | pan=="FRA2007" | pan=="GBR2005" | pan=="GRC2009" | pan=="HRV2007" | pan=="HUN2002" | pan=="IRL2002" | pan=="IRL2007" | pan=="ISL2003" | pan=="ISL2007" | pan=="ISL2009" | pan=="ITA2006" | pan=="LVA2010" | pan=="NLD2002" | pan=="NLD2010" | pan=="NOR2001" | pan=="NOR2005" | pan=="NOR2009" | pan=="POL2001" | pan=="POL2005" | pan=="POL2007" | pan=="PRT2002" | pan=="PRT2005" | pan=="PRT2009" | pan=="SVK2010" | pan=="SVN2004" | pan=="SVN2008" | pan=="SWE2002" | pan=="SWE2006" | pan=="TUR2011"

* Post-communist country dummy
gen com=1 if country==9 | country==15 |  country==22 |  country==30 |  country==35 |  country==38  
replace com=0 if missing(com)

* Countries with no invalid, blank, and mainstream or niche vote
foreach var of varlist invalid none nvote vote mvote {
replace `var'=0 if missing(`var')
by pan, sort : egen float me`var' = mean(`var')
}
drop if meinvalid==0 & menone==0 & memvote==0 | menvote==0

* Data
recode C5001* (101/999=.a)
rename C5001_*? C5001_#, renumber
rename C5002_*? C5002_#, renumber
saveold "cses merged by MM v1.dta", replace

* Party families from the CMP data
clear
import excel "Party Families.xlsx", sheet("Sheet1") firstrow
saveold "Party Families.dta", replace

* Party-level data
use "cses merged by MM v1.dta", clear
collapse (mean) C5001_* C5002_* module, by(pan)
reshape long C5001_ C5002_, i(pan) j(party)
sort module pan party
merge m:1 pan party using "Party Families.dta"
multencode parfam parfam2, gen(C5016_ C5016_2)
gen C5016_al=C5016_
replace C5016_al=C5016_2 if missing(C5016_al)
drop _merge C5016_2
recode C5016_ C5016_al (missing=.a)

drop if missing(C5016_al)
* Poland 2001 Vote share of the 9th party is 41% (!?)
drop if party==9 & pan=="POL2001"
* Turkey 2011 Vote share of the fourth party is recoded as 5.67
replace C5001_ = 5.67 if party==4 & pan=="TUR2011"
drop if missing(C5001_)

by pan, sort : egen float sumvote = total(C5001_)
replace C5001_=C5001_*(1/sumvote)

* Number of distinct party families
replace C5001_=C5001_*100
replace C5002_=C5002_*100
label val C5016_al parfam
separate C5016_al, by(C5016_al) generate(pf)
recode pf* (1/9=1)

foreach var of varlist pf* {
by pan, sort: egen float sum1`var' = sum(C5001_) if `var'==1
}

egen float panel = group(pan)
xfill sum1*, i(panel)
egen float countpfun = rownonmiss(sum1*)

* Effective number of distinct party families
foreach var of varlist sum1* {
recode `var' (missing=0)
replace `var'=(`var'/100)^2
}

egen float countpfwe = rowtotal(sum1*)
replace countpfwe=1/countpfwe

keep count* pan
saveold "cses party by MM.dta", replace

* Merging party data
use "cses merged by MM v1.dta", clear
merge m:m pan using "cses party by MM.dta"
keep count* pan country module satis govper idst urban union educ inc sex age comp com polinf pk vote invalid none nvote mvote

*Data
saveold "cses merged by MM v2.dta", replace

* Dependent variable
recode invalid none nvote mvote (0=.)
gen inv=1 if invalid==1 | none==1
recode vote (1=.) (0=1), gen(abstain)

* Problematic cases in the CSES data 
replace abstain=. if inv==1 /* Denmark 2007, 7 R report both casting an invalid vote and abstaining */
replace mvote=. if vote==0  /* Spain 2008, 4 R report both abstaining and casting a vote for a mainstream party */

* Dropping Respondents who voted for parties w/ no identifiable party family in the CMP data
recode inv abstain mvote nvote (missing=0) if inv==1 | abstain==1 | mvote==1 | nvote==1
drop if vote==1 & nvote==. & mvote==.

gen invv4=0 if inv==1
replace invv4=1 if abstain==1
replace invv4=2 if nvote==1
replace invv4=3 if mvote==1
lab define vote 0 "Invalid Vote" 1 "Abstain" 2 "Niche Vote" 3 "Mainstream Vote"
lab values invv4 vote

* Standardized political information
by pan, sort : egen float mpolinf = mean(polinf) if polinf!=.
by pan, sort : egen float sdpolinf = sd(polinf) if polinf!=.
gen polinf2=(polinf-mpolinf)/sdpolinf if polinf!=.
drop mpolinf sdpolinf

* Recoding the political knowledge variable so that higher values represent higher political knowledge
sum pk
replace pk=(`r(min)' + `r(max)')-pk

* Aggregate-level satisfaction w/ democracy
by pan, sort : egen float agsatis = mean(satis)

* Compulsory voting for multivariate probit regression
tab comp, gen(comvot)

* Interaction term for multivariate probit regression
gen nichepolinf=countpfwe*polinf2

* Variable labels
lab var comp "Compulsory Voting"
lab define cv 0 "No Compulsory Voting" 1 "Compulsory Voting (No Sanction)" 2 "Compulsory Voting (Weak Enforcement)" 3 "Compulsory Voting (Strong Enforcement)"
lab values comp cv
lab var countpfwe "Effective Number of Distinct Party Families" 
lab var countpfun "Number of Distinct Party Families" 
lab var com "Post-communist Country"
lab var polinf "Political Information (unstandardized)"
lab var polinf2 "Political Information"
lab var pk "Political Knowledge"
lab var age "Age"
lab var sex "Gender (Female)"
lab var educ "Education"
lab var inc "Household Income"
lab var union "Trade Union Membership"
lab var urban "Urban/Rural Residence"
lab var govper "Retrospective Evaluation"
lab var satis "Satisfaction with Democracy"
lab var idst "Ideological Extremity" 
lab var nichepolinf "Political Information x Eff. Num. Dist. Par. Fam." 
lab var agsatis "Satisfaction with Democracy (Election)"

* DVs
lab var invv4 "3=Vote for a Mainstream Party 2=Vote for a Niche Party 1=Abstain 0=Invalid Vote" 
lab var abstain "Abstain"
lab var inv "Invalid Vote"
lab var mvote "Vote for Mainstream Party"
lab var nvote "Vote for Niche Party" 
lab var vote "1=R Turns out, 0=Abstains" 
lab var invalid "1=R casts and invalid vote"
lab var none "1=None of the Above" 

* ID
lab var pan "Panel"
lab var country "Country"
lab var module "CSES Module"

* Data
sort inv
qui mlogit invv4 c.polinf2##c.countpfwe i.comp com age sex educ idst satis, vce(robust) baseoutcome(3)
keep if e(sample)
saveold "Replication Data_09.08.16.dta", replace
